var Checkbox=
{
    $__GetElements:function($name)
    {
        return document.getElementsByName($name);
    },

    SelectAll:function($name)
    {
        var elements=Checkbox.$__GetElements($name);
        for(var i=0;i<elements.length;i++){
            elements[i].checked=true;
        }
    },

    UnSelectAll:function($name)
    {
        var elements=Checkbox.$__GetElements($name);
        for(var i=0;i<elements.length;i++){
            elements[i].checked=false;
        }
    },

    InvertSelect:function($name)
    {
        var elements=Checkbox.$__GetElements($name);
        for(var i=0;i<elements.length;i++)
        {
            var tmp=elements[i];
            if(tmp.checked==true)
                tmp.checked=false;
            else
                tmp.checked=true;
        }
    },

    IsChecked:function($name)
    {
        var elements=Checkbox.$__GetElements($name);
        for(var i=0;i<elements.length;i++){
            if(elements[i].checked) return true;
        }
    }
};